<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
</head>
<body>
    <div id="app">
        <!-- v-bin的单向绑定，只能把数据从data给到value -->
        <input type="text" :value="msg">

        <!-- v-model数据可以双向绑定，视图改变=》data改变， data改变=>视图改变 -->
        <!-- 写法可省略value-->
        <input type="text" v-model="name">
    </div>

    <script>
        Vue.config.productionTip = false;
        const vm = new Vue({
            el:'#app',
            data(){
                return{
                    msg:'halo',
                    name:'lili'
                }
            }
        })
    </script>
</body>
</html>